package com.atguigu.gmall.feign.cart;

import com.atguigu.gmall.cart.entity.CartInfo;
import com.atguigu.gmall.cart.vo.AddCartSuccessVo;
import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RequestMapping("/api/inner/cart")
@FeignClient("service-cart")
public interface CartFeignClient {


    @GetMapping("/add/{skuId}")
    public Result<AddCartSuccessVo> addToCart(@PathVariable Long skuId
            , @RequestParam("skuNum") Integer skuNum);

    @DeleteMapping("/deleteChecked")
    public Result deleteChecked();

    @GetMapping("/checkeds")
    public Result<List<CartInfo>> getChecked();
}